import request from '@/utils/request'
const baseURL = process.env.VUE_APP_SPECIES_API
const apiURL = baseURL + '/opa-api/admin/v1/species_task'
/**
 * 查询任务
 * http://showdoc.wisetimes.cn:4999/web/#/235/1987
 * sXVmZsEJ
 * @param {*} params
 * @returns
 */
export function listTask (params) {
  return request({
    url: apiURL,
    method: 'get',
    params
  })
}

/**
 * 新增/修改任务
 * http://showdoc.wisetimes.cn:4999/web/#/235/1986
 * sXVmZsEJ
 * @param {*} data
 * @returns
 */
export function updateTask (data) {
  return request({
    url: apiURL,
    method: 'post',
    data
  })
}

/**
 * 删除任务
 * http://showdoc.wisetimes.cn:4999/web/#/235/1991
 * sXVmZsEJ
 * @param {*} data
 * @returns
 */
export function delTask (id) {
  return request({
    url: apiURL + '?id=' + id,
    method: 'delete'
  })
}
